package common;

/**
 * Created by Administrator on 2017-12-08.
 */
public enum Fid_menu {
    FIRST("管理菜单",1001),SECOUND("个人菜单",1002);
    private String firstMenu;
    private int fid;

    public static String getFirstMenu(int fid) {
        for (Fid_menu fid_menu : Fid_menu.values()) {
            if (fid_menu.getFid() == fid) {
                return fid_menu.getFirstMenu();
            }
        }
        return null;
    }
    public static int getFid(String firstMenu) {
        for (Fid_menu fid_menu : Fid_menu.values()) {
            if (fid_menu.getFirstMenu() == firstMenu) {
                return fid_menu.getFid();
            }
        }
        return 1001;
    }

    Fid_menu(String firstMenu, int fid) {
        this.firstMenu = firstMenu;
        this.fid = fid;
    }

    public String getFirstMenu() {
        return firstMenu;
    }

    public void setFirstMenu(String firstMenu) {
        this.firstMenu = firstMenu;
    }

    public int getFid() {
        return fid;
    }

    public void setFid(int fid) {
        this.fid = fid;
    }
}
